
#include <Chance.h>

Chance::Chance(double possibility):possibility_m(possibility)
{
}

bool Chance::operator==(Chance chance) const
{
	return possibility_m == chance.possibility_m;
}

Chance Chance::operator!() 
{
   	Chance chance(1 - possibility_m);	

	return chance;
}

Chance Chance::operator+(Chance &chance ) 
{
   	Chance chanceCaculated( possibility_m + chance.possibility_m);	

	return chanceCaculated;
}

Chance Chance::operator*(Chance &chance ) 
{
   	Chance chanceCaculated( possibility_m * chance.possibility_m);	

	return chanceCaculated;
}
